package com.example.boot.bean;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;
import java.io.Serializable;
import java.util.Date;


@Data
@AllArgsConstructor
@NoArgsConstructor
public class ReplyInfo implements Serializable {
    @TableId(value="id",type= IdType.AUTO)
    private int id;
    private int userId;
    private String userName;
    @NotBlank(message = "问题不能为空")
    private String question;
    private Date questionDate;
    @NotBlank(message = "类型不能为空")
    @Pattern(regexp="^[1-6]\\d*$",message="问题类型不正确")
    private int type;
    @NotBlank(message = "回复不能为空")
    private String answer;
    private int status;
    private Date answerDate;
    @JsonInclude(JsonInclude.Include.NON_NULL)//为空不返回
    private String contact;



}
